package com.ruige.data.models.local.service.impl;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruige.data.models.local.LocalService;
import com.ruige.data.models.local.mapper.LocalMapper;
import com.ruige.data.pojo.TbServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author huangrui
 * @Description
 * @create 2020-4-17
 */
@Service
public class LocalServiceImpl implements LocalService {

    @Autowired
    private LocalMapper localMapper;

    @Override
    public List<TbServices> findAll() {
        Page<TbServices> page = new Page<>();
        Page<TbServices> tbServicesPage = localMapper.selectPage(page, null);
        List<TbServices> tbServicesList = tbServicesPage.getRecords();
        long total = page.getTotal();
        System.out.println("total = " + total);
        return tbServicesList;
    }

}
